<template>
    <page-body>
        <view class="page">
            <view class="flex benben-position-layout flex flex-wrap align-center riderMy_flex_0" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
                <view class='flex flex-wrap align-center justify-between flex-sub riderMy_fd0_0'>
                    <view class='flex flex-wrap align-center riderMy_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" 
					:data-url="`/pages/index/myNew/myNew`">
                        <image class='riderMy_fd0_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"79.png"'></image>
                        <benben-message-num class='riderMy_fd0_0_c0_c1' :message-num="nume.all" size='24' color='#fff' background-color='red'>
                        </benben-message-num>
                    </view>
                    <view class='flex flex-wrap align-stretch justify-center'>
                    </view>
                    <view class='flex flex-wrap align-center justify-end riderMy_fd0_0_c2'>
                    </view>
                </view>

            </view>
            <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
            <!---flex布局flex布局开始-->
            <view class="flex benben-flex-layout flex-wrap align-center riderMy_flex_1">
                <image class='riderMy_fd1_0' @tap.stop="handleJumpDiy" data-type="navigateTo" 
				:data-url="`/pages/my/myInfoRider/myInfoRider`" mode="aspectFill" :src='user.logo'></image>
                <view class='flex flex-direction align-stretch flex-sub riderMy_fd1_1' @tap.stop="handleJumpDiy" data-type="navigateTo" 
				:data-url="`/pages/my/myInfoRider/myInfoRider`">
                    <text class='riderMy_fd1_1_c0'>{{user.user_nickname}}</text>
                    <view class='flex flex-wrap align-center riderMy_fd1_1_c1'>
                        <text class='riderMy_fd1_1_c1_c0'>{{user.score}}</text>
                        <view class='flex flex-wrap align-center riderMy_fd1_1_c1_c1'>
                            <template v-for="starNum in [1,2,3,4,5]">
                                <image v-if="user.score >= starNum" :key="starNum" class='riderMy_star1fd1_1_c1_c1' mode="aspectFit" :src='STATIC_URL+"133.png"'></image>
                                <image v-else :key="starNum" class='riderMy_star1fd1_1_c1_c1' mode="aspectFit" :src='STATIC_URL+"134.png"'></image>
                            </template>
                        </view>
                    </view>
                    <view class='flex flex-wrap align-center'>
                        <view class='riderMy_fd1_1_c2_c0'>
                            <text>{{user.good_rate}}</text>
                            <text>%好评率</text>
                        </view>
                    </view>
                </view>
                <view class='flex flex-wrap align-center riderMy_fd1_2' @tap.stop="qiehuan">
                    <image class='riderMy_fd1_2_c0' mode="aspectFit" :src='STATIC_URL+"129.png"'></image>
                    <text class='riderMy_fd1_2_c1'>切换用户</text>
                </view>
            </view>

            <!---flex布局flex布局结束-->
            <!---flex布局flex布局开始-->
            <view class="flex flex-direction align-stretch benben-flex-layout riderMy_flex_2">
                <view class='flex flex-direction align-stretch riderMy_fd2_0'>
                    <view class='flex flex-wrap align-center riderMy_fd2_0_c0'>
                        <text class='riderMy_fd2_0_c0_c0'>接单状态</text>
                        <text class='riderMy_fd2_0_c0_c1' style="color: #34BB34;" v-if=" user.is_open=='1'" @tap.stop="popupShow1718955297247=true">接单中</text>
						<text class='riderMy_fd2_0_c0_c1' v-if=" user.is_open!='1'" @tap.stop="popupShow1718955297247=true">休息中</text>
                        <text class='fu-iconfont2' @tap.stop="popupShow1718955297247=true">&#xe7f2;</text>
                    </view>
                    <view class='flex flex-wrap align-center riderMy_fd2_0_c1'>
						
                        <view class='flex flex-direction align-stretch riderMy_fd2_0_c1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" 
						:data-url="`/pages/riderMy/incomeay/incomeay?today_income=${numDetail.today_income}`">
                            <text class='riderMy_fd2_0_c1_c0_c0'>{{numDetail.today_income}}</text>
                            <text class='riderMy_fd2_0_c1_c0_c1'>今日收入(￥)</text>
                        </view>
                        <view class='flex flex-direction align-stretch riderMy_fd2_0_c1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" 
						:data-url="`/pages/riderMy/cumulative/cumulative?all_income=${numDetail.all_income}`">
                            <text class='riderMy_fd2_0_c1_c0_c0'>{{numDetail.all_income}}</text>
                            <text class='riderMy_fd2_0_c1_c0_c1'>累计收入(￥)</text>
                        </view>
                    </view>
                    <view class='flex flex-wrap align-center riderMy_fd2_0_c1'>
                        <view class='flex flex-direction align-stretch riderMy_fd2_0_c1_c0' @tap.stop="caozuo">
                            <text class='riderMy_fd2_0_c1_c0_c0'>{{numDetail.underway_number}}</text>
                            <text class='riderMy_fd2_0_c1_c0_c1'>进行中订单</text>
                        </view>
                        <view class='flex flex-direction align-stretch riderMy_fd2_0_c1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/riderMy/complete/complete`">
                            <text class='riderMy_fd2_0_c1_c0_c0'>{{numDetail.finish_number}}</text>
                            <text class='riderMy_fd2_0_c1_c0_c1'>已完成订单</text>
                        </view>
                    </view>
                    <view class='flex flex-wrap align-center riderMy_fd2_0_c1'>
                        <view class='flex flex-direction align-stretch riderMy_fd2_0_c1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/riderMy/morderOede/morderOede`">
                            <text class='riderMy_fd2_0_c1_c0_c0'>{{numDetail.month_number}}</text>
                            <text class='riderMy_fd2_0_c1_c0_c1'>本月订单</text>
                        </view>
                        <view class='flex flex-direction align-stretch riderMy_fd2_0_c1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/riderMy/morderOede/morderOede?optpe=1`">
                            <text class='riderMy_fd2_0_c1_c0_c0'>{{numDetail.all_number}}</text>
                            <text class='riderMy_fd2_0_c1_c0_c1'>累计订单</text>
                        </view>
                    </view>
                </view>
                <view class='flex flex-wrap align-stretch riderMy_fd2_1'>
                    <view class='flex flex-direction flex-wrap align-center riderMy_fd2_1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/riderMy/myPay/myPay`">
                        <image class='riderMy_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"96.png"'></image>
                        <text class='riderMy_fd2_1_c0_c1'>我的钱包</text>
                    </view>
                    <view class='flex flex-direction flex-wrap align-center riderMy_fd2_1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/riderMy/evaluate/evaluate?aid=${user.aid}`">
                        <image class='riderMy_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"97.png"'></image>
                        <text class='riderMy_fd2_1_c0_c1'>我的评价</text>
                    </view>
                    <view class='flex flex-direction flex-wrap align-center riderMy_fd2_1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/riderMy/record/record`">
                        <image class='riderMy_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"98.png"'></image>
                        <text class='riderMy_fd2_1_c0_c1'>超时记录</text>
                    </view>
                    <view class='flex flex-direction flex-wrap align-center riderMy_fd2_1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/userSet/feedBack/feedBack`">
                        <image class='riderMy_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"99.png"'></image>
                        <text class='riderMy_fd2_1_c0_c1'>意见反馈</text>
                    </view>
                    <view class='flex flex-direction flex-wrap align-center riderMy_fd2_1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/userSet/aboutUs/aboutUs`">
                        <image class='riderMy_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"100.png"'></image>
                        <text class='riderMy_fd2_1_c0_c1'>关于我们</text>
                    </view>
                    <view class='flex flex-direction flex-wrap align-center riderMy_fd2_1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/userSet/kf/kf`">
                        <image class='riderMy_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"101.png"'></image>
                        <text class='riderMy_fd2_1_c0_c1'>客服中心</text>
                    </view>
                    <view class='flex flex-direction flex-wrap align-center riderMy_fd2_1_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/riderSet/seup/seup`">
                        <image class='riderMy_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"102.png"'></image>
                        <text class='riderMy_fd2_1_c0_c1'>系统设置</text>
                    </view>
                </view>
            </view>

            <!---flex布局flex布局结束-->
            <benben-popup v-model="popupShow1718955297247" :mask="true" :mask-close-able="true" mode='bottom' :z-index='999'>
                <view class="flex benben-flex-layout flex-wrap align-center">
                    <view class='flex flex-direction align-stretch flex-sub riderMy_fd3_0'>
                        <view class='flex flex-direction flex-wrap align-center'>
                            <text class='riderMy_fd3_0_c0_c0'>接单状态</text>
                        </view>
                        <benben-select-diy ref="showSelectPopup1718955242627" class-name='flex flex-direction flex' :items.sync="list" v-model="user.is_open" 
						@change="getjl48959a57ebcdFunc()" default-type="value" default-label="name" :allow-cancel='false' type="radio" :disabled='false'>
                            <template v-for='(item,key0) in list'>
                                <view v-if="item.isSelected" class='flex justify-center flex riderMy_fd3_0_c1_c0' :key="key0" @tap="$refs.showSelectPopup1718955242627.tapHandle(key0)">
                                    <text class='riderMy_fd3_0_c1_c0_c0'>{{item.name}}</text>
                                    <text class='fu-iconfont2  riderMy_fd3_0_c1_c0_c1'>&#xe7d8;</text>
                                </view>
                                <view v-else class='flex align-stretch justify-center flex riderMy_fd3_0_c1_c0' :key="key0" @tap="$refs.showSelectPopup1718955242627.tapHandle(key0)">
                                    <text class='riderMy_fd3_0_c1_c0_c0'>{{item.name}}</text>
                                </view>
                            </template>
                        </benben-select-diy>
                    </view>
                </view>
            </benben-popup>
			<!-- <benben-picker ref="benbenWritePickerCodepicker4" :visible.sync="popupShow1718955297247"  :value.sync='user.is_open'
						:options='list' mode='selector' default-type='aid'  :mask-show='true' :timeout='true' :picker-height='88' 
						:default-props='{"label":"name","value":"aid"}' @change="getjl48959a57ebcdFunc">
			     <template #picker-header>
			         <view class='flex flex-wrap align-center justify-between index_picker4_0'>
			             <text class='index_picker4_0_c0' @tap="$refs.benbenWritePickerCodepicker4.cancel()">取消</text>
			             <text class='index_picker4_0_c1'>接单状态</text>
			             <text class='index_picker4_0_c2' @tap="$refs.benbenWritePickerCodepicker4.pickerConfirm()">确定</text>
			         </view>
			     </template>
			 </benben-picker> -->


        </view>
    </page-body>
</template>
<script>
    import {
        validate
    } from '@/common/utils/validate.js'

    export default {
        components: {},


        data() {
            return {
                "popupShow1718955297247": false,
                "user": {
                    "aid": "",
                    "user_nickname": "",
                    "user_mobile": "",
                    "name": "",
                    "logo": "",
                    "phone": "",
                    "sex": "",
                    "birthday": "",
                    "score": "",
                    "good_rate": "",
                    "is_open": "",
                    "create_time": "",
                    "user_student_number": ""
                },
                "numDetail": {
                    "today_income": "",
                    "all_income": "",
                    "underway_number": "",
                    "month_number": "",
                    "finish_number": "",
                    "all_number": ""
                },
                "nume": {
                    "one": {
                        "new_msg": "",
                        "new_msg_num": "",
                        "new_time": ""
                    },
                    "two": {
                        "new_msg": "",
                        "new_msg_num": "",
                        "new_time": ""
                    },
                    "count": {
                        "new_msg": "",
                        "new_msg_num": ""
                    }
                },
                "list": [{
                    "name": "接单中",
                    "value": "1",
                    "image": ""
                }, {
                    "name": "休息中",
                    "value": "0",
                    "image": ""
                }],
                "detal": []
            };
        },
        computed: {

        },
        watch: {},
        onLoad(options) {

        },
        onUnload() {

        },
        onReady() {

        },
        onShow() {
            
        },
        onHide() {

        },
        onResize() {

        },
        onPullDownRefresh() {

        },
        onReachBottom(e) {

        },
        onPageScroll(e) {

        },
        methods: {
			caozuo(){
				uni.setStorageSync('jinxingzhong', 1)
				uni.switchTab({
					url: '/pages/tabBar/order/order'
				});
			},
			together(){
				this.getwmc78c4772da97Func()
				this.getjc674ed4a676bbFunc()
				this.getqd46d88852707bFunc()
			},
			qiehuan(){
				// if (this.isLogin === true) {
				// 	if(this.renzheng.code == 0){
				// 		this.$util.showModal({
				// 			title: '提示',
				// 			content: '您还没有认证骑手,是否去认证？',
				// 			confirmText: '继续',
				// 			success: resd => {
				// 				if (resd.confirm) {
				// 					this.$urouter.navigateTo(`/pages/my/riderRz/riderRz`);
				// 				}
				// 			},
				// 		})
				// 		return
				// 	}
				// 	if(this.renzheng.status==0 || this.renzheng.status==2){
				// 		this.$urouter.navigateTo(`/pages/my/revieweds/revieweds`);
				// 	}else if(this.renzheng.status==1){
						uni.setStorageSync('tabberType', 1)
						uni.reLaunch({
							url: '/pages/tabBar/index/index'
						});
				// 	}
				// }else{
				// 	this.$urouter.navigateTo(`/pages/tabBar/login/login?type=1`);
				// }
			},
            //个人中心-获取会员详细信息
            async getwmc78c4772da97Func() {
                //请求方法
                //数据验证

                let datauser = await this.$api.get(global.apiUrls.post6673e51c3b940, {

                });

                if (datauser.data.code != 1) {
                    this.$message.info(datauser.data.msg);
                    return
                }
                let infouser = datauser.data;
                this.user = infouser.data

            },
            //骑手端-获取骑手端个人中心数据
            async getjc674ed4a676bbFunc() {
                //请求方法
                //数据验证

                let datanumDetail = await this.$api.get(global.apiUrls.post6674ed4a676bb, {

                });

                if (datanumDetail.data.code != 1) {
                    this.$message.info(datanumDetail.data.msg);
                    return
                }
                let infonumDetail = datanumDetail.data;
                this.numDetail = infonumDetail.data

            },
            //获取未读消息数量及最新消息
            async getqd46d88852707bFunc() {
                //请求方法
                //数据验证

                let datanume = await this.$api.get(global.apiUrls.post649039e86761b, {
					type: '3'
                });

                if (datanume.data.code != 1) {
                    this.$message.info(datanume.data.msg);
                    return
                }
                let infonume = datanume.data;
                this.nume = infonume.data

            },
            //编辑骑手信息
            async getjl48959a57ebcdFunc(item) {
				console.log(item,this.user.is_open)
				// return
                //请求方法
                //数据验证

                let datadetal = await this.$api.dbPost(global.apiUrls.post648959a57ebcd, {
                    is_open: this.user.is_open
                });
                if (!datadetal) return
                if (datadetal.data.code != 1) {
                    this.$message.info(datadetal.data.msg);
                    return
                }
                let infodetal = datadetal.data;
                this.detal = infodetal.data

                this.popupShow1718955297247 = false;
            }
        }
    };
</script>
<style lang="scss" scoped>
    .page {
        width: 100vw;
        overflow-x: hidden;
        min-height: calc(100vh - var(--window-bottom));
        background: url(image-path('95.png')) no-repeat;
        background-size: 100% 440rpx;
    }

    .riderMy_flex_0 {
        width: 750rpx;
        height: 88rpx;
        overflow: hidden;
        z-index: 10;
        top: 0rpx;
    }

    .riderMy_fd0_0_c2 {
        width: 120rpx;
    }

    .riderMy_fd0_0_c0_c1 {
        position: absolute;
        left: 20rpx;
        top: -20rpx;
    }

    .riderMy_fd0_0_c0_c0 {
        width: 38rpx;
        height: 38rpx;
        border-radius: 0rpx 0rpx 0rpx 0rpx;
    }

    .riderMy_fd0_0_c0 {
        width: 120rpx;
        position: relative;
    }

    .riderMy_fd0_0 {
        padding: 0rpx 32rpx 0rpx 32rpx;
    }

    .riderMy_flex_1 {
        padding: 30rpx 0rpx 0rpx 30rpx;
    }

    .riderMy_fd1_2_c1 {
        color: #FF8E21;
        font-size: 28rpx;
        font-weight: 600;
        margin: 0rpx 0rpx 0rpx 10rpx;
    }

    .riderMy_fd1_2_c0 {
        width: 28rpx;
        height: 32rpx;
        border-radius: 0rpx 0rpx 0rpx 0rpx;
        margin: 0rpx 0rpx 0rpx 29rpx;
    }

    .riderMy_fd1_2 {
        background: #FFFFFF;
        margin: 0rpx 0rpx 0rpx auto;
        border-radius: 50rpx 0rpx 0rpx 50rpx;
        width: 203rpx;
        height: 72rpx;
    }

    .riderMy_fd1_1_c2_c0 {
        border: 1px solid #169EF0;
        border-radius: 17rpx 17rpx 17rpx 17rpx;
        font-size: 20rpx;
        font-weight: 400;
        color: #169EF0;
        padding: 2rpx 16rpx 2rpx 16rpx;
    }

    .riderMy_star1fd1_1_c1_c1 {
        height: 22rpx;
        margin: 0rpx 5rpx 0rpx 5rpx;
        width: 32rpx;
    }

    .riderMy_star1fd1_1_c1_c1 {
        width: 22rpx;
        height: 22rpx;
        border-radius: 0rpx 0rpx 0rpx 0rpx;
        margin: 0rpx 5rpx 0rpx 5rpx;
    }

    .riderMy_fd1_1_c1_c1 {
        margin: 0rpx 0rpx 0rpx 16rpx;
    }

    .riderMy_fd1_1_c1_c0 {
        color: #333333;
        font-size: 24rpx;
        font-weight: 500;
    }

    .riderMy_fd1_1_c1 {
        margin: 26rpx 0rpx 14rpx 0rpx;
    }

    .riderMy_fd1_1_c0 {
        color: #333333;
        font-size: 36rpx;
        font-weight: 700;
    }

    .riderMy_fd1_1 {
        padding: 0rpx 24rpx 0rpx 24rpx;
    }

    .riderMy_fd1_0 {
        width: 120rpx;
        height: 120rpx;
        border-radius: 120rpx;
    }

    .riderMy_flex_2 {
        padding: 30rpx 24rpx 30rpx 24rpx;
    }

    .riderMy_fd2_1_c0_c1 {
        color: #333333;
        font-size: 24rpx;
        font-weight: 400;
        margin: 8rpx 0rpx 0rpx 0rpx;
    }

    .riderMy_fd2_1_c0_c0 {
        width: 80rpx;
        height: 80rpx;
        border-radius: 80rpx;
    }

    .riderMy_fd2_1_c0 {
		width: 25%;
		margin: 0 0 33rpx 0;
        // margin: 33rpx 33rpx 0rpx 33rpx;
		// margin: 0 40rpx 33rpx 40rpx;
    }
	// .riderMy_fd2_1_c0:nth-child(1){
	// 	margin-left: 0;
	// }
	// .riderMy_fd2_1_c0:nth-child(5){
	// 	margin-left: 0;
	// }
	// .riderMy_fd2_1_c0:nth-child(4n){
	// 	margin-right: 0;
	// }

    .riderMy_fd2_1 {
        background: #FFFFFF;
        border-radius: 16rpx 16rpx 16rpx 16rpx;
        margin: 24rpx 0rpx 0rpx 0rpx;
        padding: 32rpx 0rpx 0;
    }

    .riderMy_fd2_0_c1_c0_c1 {
        color: #666666;
        font-size: 24rpx;
        font-weight: 400;
    }

    .riderMy_fd2_0_c1_c0_c0 {
        color: #14151A;
        font-size: 48rpx;
        font-weight: 700;
    }

    .riderMy_fd2_0_c1_c0 {
        width: 50%;
    }

    .riderMy_fd2_0_c1 {
        margin: 32rpx 0rpx 32rpx 0rpx;
    }

    .riderMy_fd2_0_c0_c1 {
        color: #333333;
        font-size: 28rpx;
        font-weight: 700;
        margin: 0rpx 24rpx 0rpx auto;
    }

    .riderMy_fd2_0_c0_c0 {
        color: #333333;
        font-size: 28rpx;
        font-weight: 700;
    }

    .riderMy_fd2_0_c0 {
        border-bottom: 1px solid rgba(237, 237, 237, 1);
        padding: 32rpx 0rpx 32rpx 0rpx;
    }

    .riderMy_fd2_0 {
        background: #FFFFFF;
        border-radius: 16rpx 16rpx 16rpx 16rpx;
        padding: 0rpx 32rpx 0rpx 32rpx;
    }

    .riderMy_fd3_0_c1_c0_c1 {
        color: rgba(233, 145, 45, 1);
        position: absolute;
        right: 34%;
    }

    .riderMy_fd3_0_c1_c0_c0 {
        font-size: 32rpx;
        color: #333333;
    }

    .riderMy_fd3_0_c1_c0 {
        // margin: 23rpx 0rpx 24rpx 0rpx;
        position: relative;
		height: 100rpx;
		line-height: 100rpx;
		border-tap:1px solid rgba(0, 0, 0, 0.7);
		    
    }

    .riderMy_fd3_0_c0_c0 {
        padding: 24rpx 0rpx 24rpx 0rpx;
        font-size: 32rpx;
    }

    .riderMy_fd3_0 {
        background: var(--benbenbgColor1);
        height:500rpx;
        background-size: 100% auto;
        border-radius: 16rpx 16rpx 0rpx 0rpx;
		padding-bottom: 100rpx;
    }
	.index_picker4_0_c2 {
	    color: #FF8E21;
	    font-size: 28rpx;
	    font-weight: 700;
	    line-height: 40rpx;
	    text-align: left;
	    font-style: normal;
	}
	
	.index_picker4_0_c1 {
	    color: #333333;
	    font-size: 36rpx;
	    font-weight: 700;
	    line-height: 50rpx;
	    text-align: left;
	    font-style: normal;
	}
	
	.index_picker4_0_c0 {
	    color: #999999;
	    font-size: 28rpx;
	    font-weight: 400;
	    line-height: 40rpx;
	    text-align: left;
	    font-style: normal;
	}
	
	.index_picker4_0 {
	    border-bottom: 1px solid #eee;
	    background: #fff;
	    padding: 0rpx 32rpx 0rpx 32rpx;
	    border-radius: 24rpx 24rpx 0rpx 0rpx;
	    background-size: 100% auto !important;
	    height: 110rpx;
	}
</style>